function aaaa(file) {
    var prevDiv = document.getElementById('androimg');
    if (file.files && file.files[0])
    {
        var reader = new FileReader();
        reader.onload = function(evt){
            prevDiv.innerHTML = '<img src="' + evt.target.result + '" height="150" width="150"/>';
        }
        reader.readAsDataURL(file.files[0]);
    }
    else
    {
        prevDiv.innerHTML = '<div class="img" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src=\'' + file.value + '\'"></div>';
    }
}
$("#adtvmout").click(function () {
    window.location.href = '/feedback/logo';
});

$("#adtvmadd").click(function () {
    var data = new FormData($("#adtvminfo" )[0]);
    var id = $("input[name='id']").val();
    $.ajax({
        url: '/feedback/add',
        type: 'POST',
        data: data,
        dataType: 'JSON',
        async: false,
        cache: false,
        contentType: false,
        processData: false,
        success: function (json) {
            if (json.code == 2000) {
                if (id != '') {
                    history.back(-1);
                } else {
                    window.location.href = '/feedback/logo'
                }
            } else {
                dshow(json.message);
            }
        }
    });
});
